package com.hn.kiss.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户角色关联
 * </p>
 *
 * @author zxy
 * @since 2020-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user_role")
@ApiModel(value="UserRole对象", description="用户角色关联")
public class UserRole implements Serializable {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键")
    @TableField(fill = FieldFill.INSERT)
    private String id;

    @ApiModelProperty(value = "用户id", required = true)
    @NotBlank
    private String userId;

    @ApiModelProperty(value = "角色代码", required = true)
    @NotBlank
    private String roleCode;

    @ApiModelProperty(value = "标记(1:默认角色,0:非默认角色)")
    private String sign;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createDate;



}
